/**
 * JAVACC DEMO 1.0
 * @copy right dwusoft company All rights reserved. 
 * @Package com.dwusoft.platform.interceptor  
 */
package com.dwusoft.platform.interceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

/**
 * description:  权限拦截器
 * @author Hou Dayu 创建时间：2015-7-28  
 * @Copyright(c)2014:北京--软件技术有限公司
 */
public class AuthInterceptor extends HandlerInterceptorAdapter {

	/**
	 * TODO 在controller前拦截.    
	 */
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
		if (handler instanceof HandlerMethod) {//方法级拦截

			return true;
		} else {
			return super.preHandle(request, response, handler);
		}
	}

}
